home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Taifun / Taifun 073 (1988-11-15)(Ossowski, Stefan)(DE)(PD).zip / Taifun 073 (1988-11-15)(Ossowski, Stefan)(DE)(PD).adf / RunBack / README < prev    next >
Text File  |  1988-08-14  |  3KB  |  77 lines

  1. RunBack:    Run a program in the background.
  2.     ***    Now searches your command search path.    ***
  3.         A revision of Rob Peck's "RunBack" program and
  4.          Carolyn Scheppner's "Which" program.
  5.  
  6. Author:        Daniel Barrett
  7.         Department of Computer Science
  8.         The Johns Hopkins University
  9.         Baltimore, MD  21218
  10.  
  11.         barrett@cs.jhu.edu
  12.         ins_adjb@jhunix.UUCP
  13.  
  14. Note:        Both the original RunBackground and Which are in 
  15.         the Public Domain.  So is all my code that I added.
  16.         Use it however you please.
  17.  
  18. INTRODUCTION
  19. ------------
  20.     This is my altered version of Rob Peck's fine program, RunBack.
  21. RunBack, similar to Run, allows you to startup a CLI program and let
  22. it run in the background.  Unlike Run, however, RunBack then allows 
  23. the original CLI to be closed.  Run would hang the CLI if you did this.
  24. See the file README.peck for Rob Peck's original documentation.
  25.  
  26.     Also unlike Run, the old RunBack did not search your command search
  27. path; you always had to specify the complete pathname of your command.
  28. My new version eliminates this hassle -- it searches your path.
  29.  
  30.     The path-searching code is largely taken from Carolyn Scheppner's
  31. "Which" program.  Thanks, Carolyn!!
  32.  
  33. A PROBLEM I HAD TO OVERCOME
  34. ---------------------------
  35.  
  36.     The original RunBack program I obtained was a binary version, 
  37. compiled with the Lattice C compiler.  I use the Manx (Aztec) compiler, 
  38. version 3.6a.  When I compiled Rob's original program with Manx, something
  39. did not work anymore... quoted arguments on the command line.  The Manx 
  40. version completely drops the quotes!
  41.  
  42. The way RunBack works is that it translates:
  43.  
  44.     RunBack myProgram arg1 arg2
  45.  
  46. into:
  47.  
  48.     Run >NIL: <NIL: myProgram >NIL: <NIL: arg1 arg2
  49.  
  50. So a Lattice RunBack would translate from:
  51.  
  52.     RunBack c:emacs "my file"
  53.  
  54. into:
  55.  
  56.     Run >NIL: <NIL: c:emacs >NIL: <NIL: "my file"
  57.  
  58. HOWEVER, Manx-compiled RunBack translates it into:
  59.  
  60.     Run >NIL: <NIL: c:emacs >NIL: <NIL: my file
  61.  
  62. which is clearly WRONG.
  63.  
  64.     What did I do about it?  I added a few lines of #ifdef AZTEC_C
  65. code to the runback.c program, plus the file aztec.c.  I am effectively
  66. replacing quotes around quoted arguments.  My algorithm is this:  if
  67. an argument has a blank space in it, then it must have been quoted, so
  68. put quotes around it.
  69.     If you don't like this algorithm, the source code is included 
  70. and you can change it any way you like.
  71.     Since I don't have the Lattice compiler, I cannot be sure that
  72. my changes will work under Lattice.  That is why I made all my changes
  73. #ifdef AZTEC_C, a constant that is automatically defined by Manx C
  74. after version 3.4a.
  75.  
  76.     Enjoy the program!
  77.